<script type="text/javascript"><!--//--><![CDATA[//><!--

	
    $(document).ready(function() {
        // Setup Form
		$('#form_master').setupForm([
            { name: 'no_tagihan_listrik', type: 'text', size: 'medium', maxlength: 10 },
			{ name: 'nama_tenant', type: 'text', size: 'long', maxlength: 100},
			{ name: 'no_tenant', type: 'text', size: 'long', maxlength: 100},
			{ name: 'jenis_usaha', type: 'text', size: 'long', maxlength: 100},
			{ name: 'luas_tempat', type: 'text', size: 'long', maxlength: 100},
			
        ], <?php echo json_encode($data); ?>);
        
//		f_set_combo_city_code();
		
        <?php if($mode=="edit"){ ?>
        $('#no_tagihan_listrik').readonly();
		$('#nama_tenant').readonly();
		$('#no_tenant').readonly();
		$('#jenis_usaha').readonly();
		$('#luas_tempat').readonly();
		<?php } ?>
		
		// Set Action Button
		var buttons = [{ label: 'Save', icon: 'save', onclick: function() { 
							$('#form_master').submitForm(	'/'+controller+'/ajax_post', 
															{	detail:[{ table: 'dtl_sample2', field:['no_tagihan_listrik','nama_tenant','no_tenant','jenis_usaha','luas_tempat']}
																		], 
																onComplete : function(data){ eval('oData = '+data); loadPage('/'+controller+'/edit/?no_tagihan_listrik='+(oData.genid!='' ? oData.genid : $('#no_tagihan_listrik').getval())); }
															} 
														); 
						}},
					   { label: 'Close', icon: 'cancel', onclick: function() { loadPage('/'+controller+'/Index'); } }];
		setAction(buttons);
		
		// Create Tab
		$('#tt').tabs({ border:false });  
		
		// Focus at First Object
		$('#form_master').focusFirst();
    });
//--><!]]></script>

<div id="form_master_message" style="display:none;"></div>

<table class="tb_form" style="display:none;" cellpadding="0" cellspacing="0">
<tr>
    <td class="label">No Tagihan listrik</td>
    <td><input id="no_tagihan_listrik" /></td>
<td>
</tr>
<tr>
    <td class="label">Nama Tenant</td>
    <td><input id="nama_tenant" /></td>
</tr>
<tr>
    <td class="label">No Tenant</td>
    <td><input id="no_tenant" /></td>
 </tr>
 <tr>
    <td class="label">Jenis Usaha</td>
    <td><input id="jenis_usaha" /></td>
 </tr>
 <tr>
    <td class="label">Luas Tempat</td>
    <td><input id="luas_tempat" /></td>
 </tr>
<!--<tr>
    <td class="label">Field 2 - Field 3</td>
    <td><input id="field2" />- &nbsp; <input id="field3" /></td>
    <td class="label">Field 4</td>
    <td><input id="field4" /></td> 
</tr>-->
</table>

<!-- <div id="tt" class="easyui-tabs" style="min-height:400px;">  
    <div title="Tagihan Sewa" style="overflow:auto;padding:10px;">  
    	<?php// require_once('formdtl_sample2.php'); ?>
    </div>
 -->    
   
</div>